package com.itcast.client;

import com.itcast.pojo.PageInfo;


import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.aggregations.Aggregations;

import java.util.List;

public interface ElasticSearchClient<T> {

    public void save(T t);

    public void save(List<T> t);


    public T queryById(Long id);

    public void deleteById(Long id);

    public PageInfo<T> search(QueryBuilder queryById);

    public List<T> search(QuerySourceBuilder searchBuilder);

    public Aggregations search(AggregationBuilder aggregationBuilder);

}
